/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ijkplayer_ijkplayer_napi_proxy.h_H
#define ijkplayer_ijkplayer_napi_proxy.h_H
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include "../utils/hashmap/data_struct.h"
#include "../ijkplayer/ijkplayer_android.h"
#include "../utils/ffmpeg/custom_ffmpeg_log.h"

void message_loop_callback(void (*pe)(void *weak_this, int what, int arg1, int arg2));
void IjkMediaPlayer_native_setup(void *weak_this,void *native_window);
void IjkMediaPlayer_setDataSource(char *url);
void IjkMediaPlayer_setOption(int category, char *name, char *value);
void IjkMediaPlayer_setOptionLong(int category, char *name, int64_t value);
void IjkMediaPlayer_prepareAsync();
void IjkMediaPlayer_start();
void IjkMediaPlayer_stop();
void IjkMediaPlayer_pause();
void IjkMediaPlayer_seekTo(int64_t msec);
bool IjkMediaPlayer_isPlaying();
int  IjkMediaPlayer_getCurrentPosition();
int  IjkMediaPlayer_getDuration();
void IjkMediaPlayer_release();
void IjkMediaPlayer_reset();
void IjkMediaPlayer_setVolume(float leftVolume, float rightVolume);
void IjkMediaPlayer_native_setLogLevel(int32_t level);
void ijkMediaPlayer_setPropertyFloat(int id, float value);
float ijkMediaPlayer_getPropertyFloat(int id, float value);
void ijkMediaPlayer_setPropertyLong(int id,long value);
long ijkMediaPlayer_getPropertyLong(int id,long default_value);
int  IjkMediaPlayer_getAudioSessionId();
void IjkMediaPlayer_setLoopCount(int loop_count);
int IjkMediaPlayer_getLoopCount();
char* IjkMediaPlayer_getVideoCodecInfo();
char* IjkMediaPlayer_getAudioCodecInfo();
void ijkMediaPlayer_setStreamSelected(int stream, bool select);
HashMap  IjkMediaPlayer_getMediaMeta();
void   IjkMediaPlayer_native_openlog();
#endif //ijkplayer_ijkplayer_napi_proxy.h_H
